package com.cac.demo.dao.gkinterface;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;

@Mapper
@Repository
public interface WorkPackageDao {

    //读取xml文件中ao任务并插入到数据库
    public int insertMesAoTask(@Param("map")HashMap hashMap);
    //更新工作包站位
    int updatePackageMadeCenter(@Param("map")HashMap hashMap);
    //下达日计划时生成出库申请主表
    public int insertOutBillH(@Param("map")HashMap hashMap);

    //读取xml文件中工作包任务并插入到数据库
    public int insertWorkPackage(@Param("map")HashMap hashMap);

    //周计划修改时间
    int updateWorkPackage(@Param("map")HashMap hashMap);

    int updateAoWeek(@Param("map")HashMap hashMap);

    //下达日计划时生成出库申请子表
    public int insertOutBillL(@Param("map")HashMap hashMap);

    //读取xml文件中物料信息并插入到数据库
    public int insertMesMaterial(@Param("map")HashMap hashMap);


    //更新下达日计划中的时间
    public int updateDailyPackTime(@Param("map")HashMap hashMap);
    public int updateDailyAoTime(@Param("map")HashMap hashMap);

    //修改bill
    public int updateMatchBill(String groupNo);

    //修改aoTask
    public int updateAoTask(String groupNo);

    //下发测试日志
    public Integer issuedTest(@Param("map")HashMap hashMap);
    int insertErpExchangeLog(@Param("log") HashMap log);
    int updateErpBdata(@Param("log") HashMap log);
    int updateErpExchangeLog(@Param("log") HashMap log);
    int queryIsRepeat(@Param("log") HashMap log);

    //erp查询101处理结果-> 日志新增
    public Integer issuedBack(@Param("map")HashMap hashMap);

    //根据msgId查询处理结果
    public List<HashMap> searchWmsResult(@Param("map")HashMap map);

    //查询当天无返回结果所有msgId
    public List<HashMap> searchMsgId();

    //查询需要重推的数据
    public List<HashMap> searchBData();

    //日志文件路径修改
    public Integer updateLog(@Param("map")HashMap hashMap);



    //备份更新的缓存箱数据
    int insertZeroWorkbin();
    //备份删除的缓存箱数据
    int insertDeleteWorkbin();
    //更新表数据
    int updateZeroWorkbin();
    //删除缓存箱itemQty为零的缓存箱数据
    int delZeroWorkbin();

    int queryAoTaskIsExists(@Param("map") HashMap map);
    int insertTaskAoForProcessChange(@Param("map") HashMap map);
    int updateAoMatchBillGroupCodeBatch(@Param("map") HashMap map);

    int queryMaterialIsExists(@Param("map") HashMap map);
    int queryMaterialIsChange(@Param("map") HashMap map);
    int insertMatchBillByProcessChange(@Param("map") HashMap map);
    int updateMatchBillByProcessChange(@Param("map") HashMap map);
    int updateAreadSortMaterialMatchInfo(@Param("map") HashMap map);
    int updateMatchBillGroupCodeByProcessChange(@Param("map") HashMap map);
    int insertAoChangeTmp(@Param("map") HashMap map);
    int addMatchBillDel(@Param("map") HashMap map);
    int deleteMatchBillDel(@Param("map") HashMap map);

    HashMap searchWmsDeliveryPlanStatus(@Param("map")HashMap map);

    String selectShopByWdpId(@Param("map") HashMap map);
}
